package timing.ukulele.third.controller.weixin;

import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import timing.ukulele.common.data.ResponseData;
import timing.ukulele.data.third.view.weixin.WxMenuRuleVO;
import timing.ukulele.third.service.weixin.WxMenuRuleService;
import java.util.List;

/**
 * 微信自定义菜单分组
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/weixin/wxMenuRule")
public class WxMenuRuleController {

    private final WxMenuRuleService wxMenuRuleService;

    /**
     * /weixin/wxMenuRule/allListByAppId
     * @return
     */
    @Operation(summary = "根据APPID查询全部列表")
    @GetMapping("/allListByAppId")
    public ResponseData<List<WxMenuRuleVO>> allListByAppId(@RequestParam("appId") String appId) {
        return ResponseData.success(wxMenuRuleService.allListByAppId(appId));
    }

}
